package com.biz.primus.model.promotion.exception;

import com.biz.primus.base.exception.ExceptionType;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 促销模块异常定义
 *
 * @author david-liu
 */
@Getter
@AllArgsConstructor
public enum PromotionExceptionType implements ExceptionType {
    // 参数异常
    ILLEGAL_PARAMETER(9100, "参数异常"),

    MEMBER_INTO_PROMOTION_JUDGING_NOT_EXIST(9101, "参与促销用户数据异常"),

    ILLEGAL_STATE(9102, "促销服务内部数据异常"),

    SECKILL_PRODUCT_NOT_EXIST(9103, "秒杀商品不存在"),

    SECKILL_ORDER_CUT_QUANTITY_MUST_NOT_EQ_ZERO(9104, "秒杀订单更改库存不能为0"),

    PRESELL_ORDER_CUT_QUANTITY_MUST_NOT_EQ_ZERO(9105, "预售订单更改库存不能为0"),

    ACTIVITY_IS_DISABLED(9106, "活动出于被禁用状态"),

    ACTIVITY_NOT_IN_VALID_PERIOD(9107, "当前时间不在活动范围内"),

    INTERNAL_SERVICE_INTERRUPT(9108, "调用依赖服务异常");

    /**
     * 异常码
     */
    private int code;

    /**
     * 异常描述
     */
    private String description;
}
